
<div id="toolbar-box">
  <div class="t">
    <div class="t">
      <div class="t"></div>
    </div>
  </div>
  <div class="m">
    <div id="toolbar" class="toolbar">
        <table class="toolbar"><tbody><tr>
        	<td id="toolbar-save" class="button"><a class="toolbar" onClick="javascript: submitbutton('save'); return false;" href="javascript:void(0);"> <span title="Save" class="icon-32-save"> </span> Save </a> </td>
	        <td id="toolbar-cancel" class="button"><a class="toolbar" onClick="javascript: submitbutton('cancel'); return false;" href="javascript:void(0);"> <span title="Cancel" class="icon-32-cancel"> </span> Cancel </a> </td>
        </tr></tbody></table>
    </div>
    <div class="header icon-48-user">chỉnh sửa nội dung</div>
    <div class="clr"></div>
  </div>
  <div class="b">
    <div class="b">
      <div class="b"></div>
    </div>
  </div>
</div>
<div class="clr"></div>
<div id="element-box">
  <div class="t">
    <div class="t">
      <div class="t"></div>
    </div>
  </div>
  <div class="m">
<script language="javascript" type="text/javascript">
	function submitbutton(pressbutton) {
		var form = document.adminForm;
		if (pressbutton == 'cancel') {
			submitform( pressbutton );
			return;
		}
                if($('#GiftTitle').val() == ''){
                    alert('Vui lòng nhập title');
                    return;
                }
                submitform( pressbutton );
	}
</script>
    <?php echo $this->Form->create('Gift', array('type'=>'file', 'style'=> 'clear: both;', 'name'=>'adminForm', 'id'=>'adminForm')); ?>
      <div class="col">
        <fieldset class="adminform">
        <legend>User Details</legend>
        <table cellspacing="1" class="admintable">
          <tbody>
            <tr>
              <td width="150" class="key"><label for="title"> title </label>
              </td>
              <td>
                    <?php echo $this->Form->input('title', array('class'=>'inputbox', 'size'=> 40, 'label'=> false)); ?>
              </td>
            </tr>

            <tr>
              <td width="150" class="key"><label for="published"> Published </label>
              </td>
              <td>
                    <?php echo $this->Form->radio('published', array('1'=> 'Yes', 0=>'No'), array('legend'=>false,'default'=> '1')); ?>
              </td>
            </tr>
            <tr>
              <td width="150" class="key"><label for="price"> price </label>
              </td>
              <td>
                    <?php echo $this->Form->input('price', array('class'=>'inputbox', 'size'=> 40, 'label'=> false)); ?>
              </td>
            </tr>

            <?php if($check_thumbnail_exist): ?>
            <tr>
              <td width="150" class="key"><label for="preview">Preview </label>
              </td>
              <td>
                    <?php
                        echo $this->Html->image($image_url);
                    ?>
                    <?php echo $this->Form->input('delete_image', array('type'=>'checkbox', 'class'=>'inputbox', 'label'=> false)); ?>
                    Xóa Hình Này
              </td>
              
            </tr>
            <?php
                endif;
            ?>
            <tr>
              <td width="150" class="key"><label for="images_small">Thumbnail </label>
              </td>
              <td>
                    <?php echo $this->Form->input('images_small', array('type'=>'file', 'class'=>'inputbox', 'size'=> 40, 'label'=> false)); ?>
              </td>
            </tr>

            <?php if($check_large_thumbnail_exist): ?>
            <tr>
              <td width="150" class="key"><label for="preview">Preview </label>
              </td>
              <td>
                    <?php
                        echo $this->Html->image($large_image_url);
                    ?>
                    <?php echo $this->Form->input('delete_large_image', array('type'=>'checkbox', 'class'=>'inputbox', 'label'=> false)); ?>
                    Xóa Hình Này
              </td>

            </tr>
            <?php
                endif;
            ?>
            <tr>
              <td width="150" class="key"><label for="images_large"> large Thumbnail </label>
              </td>
              <td>
                    <?php echo $this->Form->input('images_large', array('type'=>'file', 'class'=>'inputbox', 'size'=> 40, 'label'=> false)); ?>
              </td>
            </tr>
             <tr>
              <td width="150" class="key"><label for="note"> note </label>
              </td>
              <td>
                    <?php echo $this->Form->input('note', array('class'=>'inputbox', 'cols'=> 80, 'label'=> false, 'type'=>'textarea')); ?>
              </td>
            </tr>
            <tr>
              <td class="key"><label for="content">Content </label>
              </td>
              <td>
                    <?php echo $this->Editor->loadEditor('data[Gift][description]', $description); ?>
              </td>
            </tr>
          </tbody>
        </table>
        </fieldset>
      </div>
      <div class="clr"></div>
      <?php echo $this->Form->input('id', array('type'=>'hidden')); ?>
      <input type="hidden" name="task" value="" />
    </form>
    <div class="clr"></div>
  </div>
  <div class="b">
    <div class="b">
      <div class="b"></div>
    </div>
  </div>
</div>
